import {userLogin,userRegister,logout} from '../http/index.js'
class login {
	constructor() {}
	vphone(value){
		var myreg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/
		 if (!myreg.test(value)) {
			return false;
		} else {
			return value;
		}
	}
	vpassword(value){
		if(!value){
			return false
		}else{
			return value
		}
	}
	async vreg(value){
		const res = await userRegister(value)
		return res
	}
	async vlogin(value){
		const res = await userLogin(value)
		return res
	}
	async vlogout(value){
		const res = await logout(value)
		return res
	}
	
}

export default login